package com.lr;

public class CountStr {
	public static void main(String args[]){
		String s ="frdshrerhe3OJUGBDHFJ";
		
		int upperSum = 0;
		int lowerSum = 0;
		int otherSum = 0;
		for(int i=0 ; i<s.length() ; i++){
			if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
				upperSum++;
			}
			else if ('a' <= s.charAt(i) && s.charAt(i) <= 'z'){
				lowerSum++;
			}
			else{
				otherSum++;
			}
		}
		
		System.out.println("upperSum=" + upperSum +
				" lowerSum=" + lowerSum +" otherSum=" + otherSum);
	}
}
